package my.edu.model.User.service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import my.edu.model.User.entity.SystemConfig;
import my.edu.model.User.mapper.SystemConfigMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class SystemConfigServiceImpl extends ServiceImpl<SystemConfigMapper, SystemConfig> implements ISystemConfigService {
    @Override
    @Transactional
    public void updateConfig(SystemConfig config) {

        remove(Wrappers.<SystemConfig>lambdaQuery().eq(SystemConfig::getId,1));
        config.setId(1L);
        save(config);

    }
}
